package gui.main;

import java.awt.Dimension;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NewsJPanel extends javax.swing.JPanel {
	private JPanel containerjPanel;
	private JLabel logojLabel;
	private JPanel buttonsjPanel;
	private JTable promemoriajTable;
	private JScrollPane tablejScrollPane;
	private JButton dettaglijButton;
	private JPanel logojPanel;

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new NewsJPanel());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public NewsJPanel() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(425, 203));
			{
				containerjPanel = new JPanel();
				this.add(containerjPanel);
				containerjPanel.setPreferredSize(new java.awt.Dimension(251, 123));
				containerjPanel.setBorder(BorderFactory.createTitledBorder("Promemoria in scadenza"));
				{
					tablejScrollPane = new JScrollPane();
					containerjPanel.add(tablejScrollPane);
					tablejScrollPane.setPreferredSize(new java.awt.Dimension(235, 88));
					{
						TableModel promemoriajTableModel = 
								new DefaultTableModel(
										new String[][] { { "One", "Two" }, { "Three", "Four" } },
										new String[] { "Column 1", "Column 2" });
						promemoriajTable = new JTable();
						tablejScrollPane.setViewportView(promemoriajTable);
						promemoriajTable.setModel(promemoriajTableModel);
					}
				}
			}
			{
				logojPanel = new JPanel();
				this.add(logojPanel);
				logojPanel.setPreferredSize(new java.awt.Dimension(135, 137));
				{
					logojLabel = new JLabel();
					logojPanel.add(logojLabel);
					logojLabel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/news128.png")));
					logojLabel.setPreferredSize(new java.awt.Dimension(128, 128));
				}
			}
			{
				buttonsjPanel = new JPanel();
				this.add(buttonsjPanel);
				buttonsjPanel.setPreferredSize(new java.awt.Dimension(382, 48));
				{
					dettaglijButton = new JButton();
					buttonsjPanel.add(dettaglijButton);
					dettaglijButton.setText("Visualizza Dettagli");
					dettaglijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/detail32.png")));
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
